<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
 <style>
      div{
          width: 300px;
          height: 200px;
          margin: auto;

      }
      p{
          display: inline-block;
          display: none;
          cursor: pointer;
          padding-left: 50px;
      }
 </style>
</head>
<body>
    <div >
        <input type="checkbox"> <span>两周内自动登录</span> <br>
        <p>测试</p>
    </div>
</body>
</html>
 <script>
     window.onload = function(){
        var a = document.querySelector("span")
        var p = document.querySelector("p")
        a.onmouseover=function(){
            p.style.display="block"
        }
        a.onmouseout=function(){
            p.style.display="none"
        }
}
 </script>